Skip to content

Conversation

CardboardTurkey
Copy link
Contributor

This PR adds 3 new commits:

chore: sate clippy

Fix clippy lints

fix: prevent panic when parsing a URL with no path

Prior to this change parse would panic at src/lib.rs:203:29 with
index out of bounds: the len is 0 but the index is 0 if given an input
like "git:".

feat: improve error handling

This removes a seemingly redundant and not very illuminating error
variant. It also ensures that the error message from the Url crate is
displayed when displaying UrlParseError.

@CardboardTurkey
Copy link
Contributor Author

Happy to make changes if I got anything wrong!

Prior to this change `parse` would panic at `src/lib.rs:203:29` with
`index out of bounds: the len is 0 but the index is 0` if given an input
like "git:".
This removes a seemingly redundant and not very illuminating error
variant. It also ensures that the error message from the `Url` crate is
displayed when displaying `UrlParseError`.
@tjtelan tjtelan merged commit 23031bf into tjtelan:main Oct 30, 2024
12 checks passed
@tjtelan
Copy link
Owner

tjtelan commented Oct 30, 2024

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants